import requests

# 读取二进制文件
# response = requests.get('http://127.0.0.1/decms57/favicon.ico')
# print(type(response.text), type(response.content))
# print(response.text)
# print(response.content)


# 保存二进制文件
response1 = requests.get('http://127.0.0.1/decms57/favicon.ico')
with open('favicon.ico', 'wb') as f:
    f.write(response1.content)
    f.close()
